package com.sunwayhorizo.health.hl7.persistent;

import com.sunwayhorizo.health.hl7.persistent.pk.RimCoreEntyQtysPK;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;


@Entity
@TableGenerator(name="EntyQtys_IdGenerator", table="RIM_Id_Generator", pkColumnName = "pkColumn", valueColumnName = "valueColumn",pkColumnValue="Enty_Qtys")
@NamedQuery(name = "RimCoreEntyQtys.findAll", query = "select o from RimCoreEntyQtys o")
@Table(name = "RIM_CORE_ENTY_QTYS")
@IdClass(RimCoreEntyQtysPK.class)
public class RimCoreEntyQtys implements Serializable {
    @Id
    @Column(name="ENTITY_ID", nullable = false, insertable = false,  updatable = false)    private Long entityId;
    @Id
    @Column(name="ENTITY_VERSION_NUM", nullable = false, insertable = false,  updatable = false)    private Long entityVersionNum;
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE,generator = "EntyQtys_IdGenerator" )
    @Column(name="ENTITY_QTY_ID", nullable = false)    private Long entityQtyId;        
    
    @Column(name="VALUE_NUM_TXT")    private String valueNumTxt;
    @Column(name="VALUE_UOM_CODE")    private String valueUomCode;
    
    @ManyToOne
    @JoinColumns({
    @JoinColumn(name = "ENTITY_ID", referencedColumnName = "ENTITY_ID"),
    @JoinColumn(name = "ENTITY_VERSION_NUM", referencedColumnName = "ENTITY_VERSION_NUM")
    })
    private RimCoreEntities rimCoreEntities;

    public RimCoreEntyQtys() {
    }

    public Long getEntityId() {
        return entityId;
    }

    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }

    public Long getEntityQtyId() {
        return entityQtyId;
    }

    public void setEntityQtyId(Long entityQtyId) {
        this.entityQtyId = entityQtyId;
    }

    public Long getEntityVersionNum() {
        return entityVersionNum;
    }

    public void setEntityVersionNum(Long entityVersionNum) {
        this.entityVersionNum = entityVersionNum;
    }

    public String getValueNumTxt() {
        return valueNumTxt;
    }

    public void setValueNumTxt(String valueNumTxt) {
        this.valueNumTxt = valueNumTxt;
    }

    public String getValueUomCode() {
        return valueUomCode;
    }

    public void setValueUomCode(String valueUomCode) {
        this.valueUomCode = valueUomCode;
    }

    public void setRimCoreEntities(RimCoreEntities rimCoreEntities) {
        this.rimCoreEntities = rimCoreEntities;
    }

    public RimCoreEntities getRimCoreEntities() {
        return rimCoreEntities;
    }
}
